package controllerInterfaces;

import java.util.List;

import javax.swing.JPanel;

import modelInterfaces.ITest;
import pluginInterfaces.IRecommender;

/**
 * 
 * @author Andy Cullache
 *
 */
public interface IControllerBenchmarkPanel {

    /**
     * run Tests list selected from the view of this controller.
     * 
     * @param numberUsers      number of users for testing.
     * @param maxRecommended      maximum number of recommendations (limit to iterate tests).
     * @param increment      increment value in each iteration of the test.      
     */
    public void runTestList(int numberTest, int split, int maxRecommended, int increment);
    
	/**
	 * Returns the JPanel that represents the view of this controller.
	 * 
	 * @return      panel the view of this controller.
	 */
    public JPanel getPanel();
    
	/**
	* Returns the list of available tests.
	* 
	* @return      list of available tests.
	*/
    public List<ITest> getTests();
    
    /**
	* Establishing the list of tests from the project to this controller.
	* 
	* @param      tests list.
	*/
    public void setTests(List<ITest> tests);
    
    /**
	* Sets the main controller as controller of this class.
	* 
	* @param controllerMain      main controller class.
	*/
	public void setMainController(IControllerMain myController);
	
	/**
	 * Create a view where you select the parameters of the result file to save.
	 */
	public void ChooseDirectoryToSaveTest();
	
	/**
	 * Create a view where you select the result file to load.
	 */
	public void ChooseDirectoryToLoadTest();
	
	/**
	 * Set a values to result of table in benchmark panel.
	 */
	public void setTable();
	
	/**
	 * Displays a dialog which sets the parameters for test execution.
	 */
	public void showDialogRunTest();
	
	/**
	* Returns the list of configurations of algorithms present in the current project.
	* 
	* @return      configuration list of algorithms.
	*/
	public List<IRecommender> getRecommenderList();
	
	/**
	 * Create a output controller to generate jar component.
	 */
	public void showOutputSetupView();
	
	/**
	 * Return a test list from this controller.
	 * 
	 * @return      test list.
	 */
	public List<ITest> getLoadTest();
	
	/**
	 * Create a graphic controller to generate plot with result tests.
	 */
	public void showGraphicView();
	
	/**
	 * Display a dialog which sets parameters for generates plot.
	 */
	public void showDialogTestGraphic();
	
	/**
	* Opens a view to set the directory and name of file to read.
	* 
	* @return      a set of "String" size 2, contains the name and path of the file to read.
	*/
	public String[] selectDirectory();
	
	/**
	 * Set test to plot (containing test results).
	 * 
	 * @param test      test containing the results.
	 * @return      true if test contains result.
	 */
	public boolean setTestToGraphic(ITest test);
	
	/**
	 * Sets the directory and name of the CSV file containing the results to be 
	 * graphed (complies the same function as the method setTestToGraphic ()).
	 * 
	 * @param dir      PATH of CSV file.
	 * @param filename      file name of CSV file.
	 * @return      true if test result can be read.
	 */
	public boolean setTestResultToGraphic(String dir, String fileName);
	
	/**
	 * Clean and empty lists of test results.
	 */
	public void clearResultTest();

	
	/**
	* Loading the list of tests in the view previously created in Test panel
	* 
	*/
	public void loadTestsToView();

}
